import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;


public class Main {
  
	public static void main (String args []){
		
		EntityManagerFactory emf = Persistence.createEntityManagerFactory("myPersistenceUnit");
		EntityManager em= emf.createEntityManager();
		em.getTransaction().begin();
		Product p = new Product();
		p.setDescription("Gel de douche");
		p.setName("gel");
		p.setPrice(3);
		em.persist(p);
		em.getTransaction().commit();
		em.close();
		emf.close();
	}
}
